home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-02-09 | 1.6 KB | 41 lines | [TEXT/GEOL] |
- Item forwarded by A33 to A34
-
- Item 3578392 6-Feb-90 13:28PST
-
- From: ROSENSTEIN1 Rosenstein, Larry
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: RE>More On UnloadAllSegs
-
- Attn: MacApp Tech
- SentBy: Larry Rosenstein
- Date 2/6/90
- Subject RE>More On UnloadAllSegs
- From Larry Rosenstein
- To MacApp Tech
-
- Subject: RE>More On UnloadAllSegs 2/6/90 12:49 PM
- First, you can call UnloadAllSegs from other than the main segment, as long as
- it is called from a resident segment. MacApp has a routine to mark segments
- resident, and you can use this dynamically to control which segments get
- unloaded by UnloadAllSegs.
-
- In the case of reading a document, if you place your main document-reading
- code in a separate segment, then at the start of the read, you can mark this
- segment as resident. After you read each part of the document, then you can
- call UnloadAllSegs to unload the segments used by that part. It's not clear
- to me that UnloadAllSegs is time consuming compared to the code that reads a
- document from disk. (The same is probably true of LoadSeg if the segment is
- still in memory. Note that UnloadSeg doesn't purge the segment from memory.)
-
- I think relying on every procedure to create a stack frame is dangerous.
- First, there are the assembler routines, which I don't think create a stack
- frame. It's also possible that an optimizing compiler will not generate a
- stack frame if the routine has no local variables. (I don't know if this is
- done currently, but it's certainly a possible optimization.)
-
- Larry Rosenstein
-
-
-